Repository navigation
Add a check for migration ordering - #582
Conversation
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4135efa. Configure here.
8d339d9 to
9ddb5d5
Compare

Note
Low Risk
CI-only guardrail with no runtime or schema behavior changes; low risk aside from PRs that add out-of-order migrations now failing until filenames are fixed.
Overview
Adds a Migration Order CI job that runs on every PR before the aggregate check can pass. It deep-checks out the repo, fetches
main, and runsscripts/check-migration-order.sh.The new script compares newly added files under
packages/trueforge/src/db/postgres/migrationsandsqlite/migrationsagainst the lexicographically latest migration already onorigin/main(override base viaMIGRATION_BASE_REF). If any added migration filename sorts at or before that baseline, the job fails with a list of invalid names; PRs with no new migrations exit successfully.The final check job now requires
migration-orderto succeed alongside existing gates.Reviewed by Cursor Bugbot for commit 9ddb5d5. Bugbot is set up for automated code reviews on this repo. Configure here.